﻿namespace ConnectionManager.Extensions
{
    public static class ProcesorExtensions
    {
        /// <summary>
        /// Checks if the value is within 5% of the max/min value
        /// </summary>
        /// <param name="value">ushort value</param>
        /// <returns>Returns true if value is not within 5% of min/max area</returns>
        public static bool NotCloseToMax(this ushort value)
        {
            return value < ushort.MaxValue - (ushort.MaxValue * 0.05) && value > ushort.MaxValue * 0.05;
        }
    }
}
